﻿


using LaserMark.DataAccess.Models;

namespace LaserMark.DataAccess.Service;

public class MarkArgsService : IMarkArgsService
{
    private IDBManager DbManager { get; set; }

    public MarkArgsService(IDBManager dbManager)
    {
        DbManager = dbManager;
    }

    public async Task<MarkArgs> GetMarks()
    {
        using var db = DbManager.Create();
        return await db.SingleAsync<MarkArgs>("where ID = '1'");
    }

    public async Task<bool> UpdateMarks(MarkArgs args)
    {
        using var db = DbManager.Create();
        return (await db.UpdateAsync(args)) > 0;
    }
}
